/** 
 * All Rights Reserved , Copyright (C) 2020 , 青岛鼎信通讯股份有限公司
 * 
 *PmArchivesCustomerAction
 * 客户档案
 * 
 * 修改纪录
 * 2020-04-16 版本：1.0 wushenghong 创建。
 * @version 版本：1.0
 * @author 作者：wushenghong
 * 创建日期：2020-04-16
 */

package com.topscomm.pm.controller;


import java.util.Map;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.topscomm.pm.controller.auto.PmArchivesCustomerControllerAuto;
import com.topscomm.pm.service.IPmArchivesCustomerService;
import com.topscomm.pub.util.StringBufferProxy;
import com.topscomm.pub.util.StringUtil;

/**
 * @author: wushenghong
 * @date: 2020-04-16
 * @description:客户档案Action
 * @modify:
 */

@RestController
@RequestMapping("ProjectManage/archives")
public class PmArchivesCustomerController extends PmArchivesCustomerControllerAuto implements IPmArchivesCustomerController{

	@Resource(name = "pmArchivesCustomerService")
	IPmArchivesCustomerService pmArchivesCustomerService;

	/**
	 * @author: wushenghong
	 * @date: 2020-04-16
	 * @param paraMap
	 * @return
	 * @return_type: String
	 * @description:转换出查询SQL语句
	 * @modify:
	 */
	@Override
	protected String spellListSql(Map paraMap) {
		StringBufferProxy sql = new StringBufferProxy();
		sql.appendSingle(" 1=1 ");
		if (paraMap.containsKey("qry_name")) {
			String value = paraMap.get("qry_name").toString();
			if (!StringUtil.isEmpty(value))
				sql.appendSingle(" and name like '%{0}%' ", value);
		}
		if (paraMap.containsKey("qry_code")) {
			String value = paraMap.get("qry_code").toString();
			if (!StringUtil.isEmpty(value))
				sql.appendSingle(" and code = '{0}' ", value);
		}
		return sql.toString();
	}

	/**
	 * @author: wushenghong
	 * @date: 2020-04-16
	 * @return
	 * @return_type: String
	 * @description:参照列表数据
	 * @modify:
	 */
	
}

